package com.chzu.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.chzu.mapper.SignSubmissionMapper;
import com.chzu.pojo.SignSubmission;
import com.chzu.service.SignSubmissionService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author lz
 * @Version 1.0
 * @Company 滁州大健康与养老产业研究院
 * @ClassName SignSubmissionServiceImpl
 * @Description TODO
 * @Date 2022/02/13 18:10
 */
@Service
public class SignSubmissionServiceImpl extends ServiceImpl<SignSubmissionMapper, SignSubmission> implements SignSubmissionService {

    @Resource
    private SignSubmissionMapper signSubmissionMapper;

    /**
     * 删除签到以及提交感想情况
     * @param id 主键id
     * @return
     */
    @Override
    public Boolean deleteSingleInstanceById(Long id) {
        return signSubmissionMapper.deleteSingleInstanceById(id);
    }

    /**
     * 获取活动的签到人数
     * @param activityId 活动id
     * @return
     */
    @Override
    public Long getSignByActivityId(String activityId) {
        return signSubmissionMapper.getSignByActivityId(activityId);
    }
}
